import { useParams } from 'react-router-dom';

import VulnerableTemplate from '@/components/VulnerableTemplate';

import CsrfLow from './level/CsrfLow';
import CsrfMid from './level/CsrfMid';

const Csrf = () => {
  const { level } = useParams();
  const levelMap: any = {
    low: CsrfLow,
    mid: CsrfMid,
  };

  return <VulnerableTemplate {...levelMap[level!]} />;
};

export default Csrf;
